package values.item
{
import core.Language;

/**
 * BuildingStateValue
 * @author jliang
 *
 */
public class BuildingStateValue
{	
	[Data(type="field", mapping="@key")]
	public var key:int = 0;
	
	[Data(type="field", mapping="@action_name")]
	public var baseActionNameKey:String;
	
	public function get actionName():String
	{
		return Language.getText(baseActionNameKey);
	}
	
	[Data(type="field", mapping="@action_time")]
	public var actionTime:Number;
	
	public function get hasAction():Boolean
	{
		return baseActionNameKey != "";
	}
	
	[Data(type="field", mapping="@pre_func")]
	public var preFunc:String;
	
	[Data(type="field", mapping="@done_func")]
	public var doneFunc:String;
	
	[Data(type="field", mapping="@next_state")]
	public var nextState:int = 0;
}
}